<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html;charset=utf-8">
<link href="images/reset.css?v={yun:}$config.cachecode{/yun}" rel="stylesheet" type="text/css" />
<link href="images/system.css?v={yun:}$config.cachecode{/yun}" rel="stylesheet" type="text/css" />
<link href="images/table_form.css?v={yun:}$config.cachecode{/yun}" rel="stylesheet" type="text/css" />
<script src="{yun:}$config.sy_weburl{/yun}/js/jquery-1.8.0.min.js?v={yun:}$config.cachecode{/yun}"></script>
<script src="js/admin_public.js?v={yun:}$config.cachecode{/yun}" language="javascript"></script>
<script language="javascript">
<!--
function checkform(myform){
  if (myform.name.value=="") {
		parent.layer.msg('请填写导航名称！', 2,8); 
      myform.name.focus();
      return (false);
  }
   if (myform.url.value=="") { 
	  parent.layer.msg('请填写链接地址！', 2,8); 
      myform.url.focus();
      return (false);
  }
  if (myform.sort.value=="") { 
	   parent.layer.msg('请填写导航排序！', 2,8); 
      myform.sort.focus();
      return (false);
  }
}
//-->
</script>
<link href="{yun:}$config.sy_weburl{/yun}/js/layui/css/layui.css?v={yun:}$config.cachecode{/yun}" rel="stylesheet">
<script src="{yun:}$config.sy_weburl{/yun}/js/layui/layui.js?v={yun:}$config.cachecode{/yun}" language="javascript"></script>
<script src="{yun:}$config.sy_weburl{/yun}/js/layui/phpyun_layer.js?v={yun:}$config.cachecode{/yun}"></script>
<title>后台管理</title>
</head>
<body class="body_ifm">
<div class="infoboxp">
<div class="admin_new_tip">
<a href="javascript:;" class="admin_new_tip_close"></a>
<a href="javascript:;" class="admin_new_tip_open" style="display:none;"></a>
<div class="admin_new_tit"><i class="admin_new_tit_icon"></i>操作提示</div>
<div class="admin_new_tip_list_cont">
<div class="admin_new_tip_list">该页面展示了添加网站地图 。</div>
</div>
</div>


 <div class="tag_box mt10">
    <iframe id="supportiframe"  name="supportiframe" onload="returnmessage('supportiframe');" style="display:none"></iframe>
    <form name="myform" target="supportiframe" action="index.php?m=navmap&c=save" method="post" onSubmit="return checkform(this);" class="layui-form">
      <table width="100%" class="table_form" style="background:#fff;">
         <tr>
              <td colspan="2" bgcolor="#f0f6fb"><div class="admin_bold">添加网站地图</div></td>
            </tr>
        <tr >
          <th width="120">类别：</th>
          <td>
            <div class="layui-form-item">
              <div class="layui-input-inline">
                <select name="nid" lay-filter="nid">
                  <option value="">请选择</option>
                  {yun:}foreach item=v from=$type{/yun}
                  <option value="{yun:}$v.id{/yun}"
                    {yun:}if $types.nid==$v.id{/yun}
                    selected
                    {yun:}/if{/yun} 
                    >{yun:}$v.name{/yun}</option>
                  {yun:}/foreach{/yun}
                </select>
              </div>
            </div>
          </td>
        </tr>
        <tr class="admin_table_trbg" >
          <th>名称：</th>
          <td><input class="input-text" type="text" name="name" size="40" value="{yun:}$types.name{/yun}"/></td>
        </tr>
        <tr class="admin_table_trbg" >
          <th>链接地址：</th>
          <td><input class="input-text" type="text" name="url" size="50" value="{yun:}$types.url{/yun}"/>
            <span class="admin_web_tip"></span></td>
        </tr>
        <tr >
          <th>伪静态地址：</th>
          <td><input class="input-text" type="text" name="furl" size="50" value="{yun:}$types.furl{/yun}"/>
            <span class="admin_web_tip"></span></td>
        </tr>
        <tr class="admin_table_trbg" >
          <th>链接类型：</th>
          <td>
            <div class="layui-form-item">
              <div class="layui-input-inline">
                <select name="type" lay-filter="type">
                  <option value="">请选择</option>
                  <option value="1"
                    {yun:}if $types.type==1{/yun}
                    selected
                    {yun:}/if{/yun} 
                    >站内链接</option>
                  <option value="2"
                    {yun:}if $types.type==2{/yun}
                    selected
                    {yun:}/if{/yun} 
                    >原链接</option>
                </select>
              </div>
              <span class="admin_web_tip">
                站内链接如：http://www.phpyun.com  原链接如：index.php?m=com
             </span>
            </div> 
          </td>
        </tr>
        <tr >
          <th>排　　序：</th>
          <td><input class="input-text" type="text" name="sort" size="5" value="{yun:}$types.sort{/yun}"/></td>
        </tr>
        <tr class="admin_table_trbg" >
          <th>弹出窗口：</th>
          <td>
            <div class="layui-form-item">
              <div class="layui-input-block">
                <input name="eject" value="1" title="新窗口" 
                  {yun:}if $types.eject=='1'{/yun} checked {yun:}/if{/yun}
                  type="radio">
                <input name="eject" value="0" title="原窗口" 
                  {yun:}if $types.eject!='1'{/yun} checked {yun:}/if{/yun}
                  type="radio">
              </div>
            </div>
          </td>
        </tr>
        <tr >
          <th>显　　示：</th>
          <td>
            <div class="layui-form-item">
              <div class="layui-input-block">
                <input name="display_switch" id="display_switch" lay-filter="display_switch" 
                  {yun:}if $types.display=='1'{/yun} checked {yun:}/if{/yun}
                  lay-skin="switch" lay-text="是|否" type="checkbox"/>
                <input type="hidden" name="display" value="{yun:}$types.display{/yun}"/>
              </div>
            </div>
          </td>
        </tr>
        <tr class="admin_table_trbg" >
           <th>&nbsp;</th>
			<td align="left" > {yun:}if $types.id{/yun}
            <input type="hidden" name="id" size="40" value="{yun:}$types.id{/yun}"/>
            <input class="admin_button" type="submit" name="submit" value="&nbsp;更 新&nbsp;"  />
            {yun:}else{/yun}
            <input class="admin_button" type="submit" name="submit" value="&nbsp;添 加&nbsp;"  />
            {yun:}/if{/yun}
            <input class="admin_button" type="reset" name="reset" value="&nbsp;重 置 &nbsp;" /></td>
        </tr>
      </table>
	  <input type="hidden" name="pytoken" value="{yun:}$pytoken{/yun}">
    </form>
  </div>
</div>
<script type="text/javascript">
  layui.use(['form'], function(){
    var form = layui.form
      ,$ = layui.$;

    form.on('switch(display_switch)', function(data){
      var v = this.checked ? 1 : 0;
      $("input[name=display]").val(v);
    });
  });
</script>
</body>
</html>